/**
 * BonusServiceImpl.java
 * 16.08.2010
 */
package org.example.booking;

import java.math.BigDecimal;

import javax.jws.WebService;

/**
 * <p>
 * </p>
 * @author tserge
 * @since 16.08.2010
 */
@WebService(endpointInterface = "org.example.booking.BonusService",
  serviceName = "BonusService",
  portName = "OrderBonus",
  targetNamespace = "http://example.org/booking/order")
public class BonusServiceImpl
  implements BonusService
{

  public Order getBonuses( final Order order )
  {
    if ( OrderType.NIGHT.equals( order.getType() ) ) {
      order.setBonus( BigDecimal.valueOf( 100 ) );
    }
    System.out.println( "BonusServiceImpl.getBonuses() : " + order );
    return order;
  }

}
